//part1:C03:ex3.14.cpp
//read some integers, then store to one vector.
#include <iostream>
#include <vector>

int main(void)
{
    using namespace std;
    vector<int> vInt;
    int i;
    char tocontinue1 = 'y';
    while (cin >> i)
    {
        vInt.push_back(i);
        cout << "to continue? (y or n)?\n";
        cin >> tocontinue1;
        if (tocontinue1 != 'y' && tocontinue1 != 'Y')
        {
            break;
        }
    }
    for (auto mem : vInt)
    {
        cout << mem << " ";
    }
    cout << endl;
    
    return 0;
}